package cn.edu.hdu.instantMessage;

public class InstantMessageProducer {
    public static AbstractInstantMessage getInstant_mess(String name) {
		if(name.equalsIgnoreCase("VideoInstantMessage")) {
			System.out.println("Produce VideoInstantMessage");
			return new AbstractVideoInstantMessage();
		}
		else if(name.equalsIgnoreCase("photoInstantMessage")) {
			System.out.println("Produce photoInstantMessage");
			return new AbstractPhotoInstantMessage();
			//return null;
		}
		else {
			System.out.println("No Item");
			return null;
		}
	}
    
}
